﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using FlexFlow.Runtime;

namespace FlexFlow.MVC.Controllers
{
    [Auth(AuthType.API)]
    public class UserRelationAPIController : Controller
    {
       /// <summary>
        /// 设定指定ID的关系关联的组织机构
        /// </summary>
        /// <param name="relId">
        /// 要设置的关系ID
        /// </param>
        /// <param name="OrgId">
        /// 要设置的组织机构ID
        /// </param>
        /// <returns>
        /// 操作结果
        /// </returns>
        public ActionResult SetOrg(Guid relId, Guid OrgId)
        {
            return Json(UserRelationManager.Default.SetOrg(relId, OrgId));
        }
        /// <summary>
        /// 删除具有指定ID的组织机构实体
        /// </summary>
        /// <param name="id">
        /// 要删除的实体的ID
        /// </param>
        /// <returns>
        /// 操作结果
        /// </returns>
        public ActionResult Delete(Guid id)
        {
            return Json(UserRelationManager.Default.Delete(id));
        }
    }
}
